file(GLOB_RECURSE source CONFIGURE_DEPENDS *.cpp *.h)
file(GLOB_RECURSE glad_source CONFIGURE_DEPENDS glad/*.c glad/*.h)

target_sources(zeno PRIVATE ${source} ${glad_source})
target_include_directories(zeno PRIVATE glad/include)
target_include_directories(zeno PRIVATE .)

find_package(SDL2 REQUIRED)
target_include_directories(zeno PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(zeno PRIVATE ${SDL2_LIBRARIES})

if (UNIX AND NOT APPLE)
    find_package(X11 COMPONENTS Xext)
    if (X11_Xext_FOUND)
        target_include_directories(zeno PRIVATE ${X11_Xext_INCLUDE_PATH})
        target_link_libraries(zeno PRIVATE ${X11_Xext_LIB})
    else()
        message(WARNING "X11_Xext not found")
    endif()
endif()
